fix(site): correct canonical URLs and dev CSS build - #189
Open
jeremymcs wants to merge 2 commits into
Open
Conversation
build.mjs --watch cleared dist/ and then relied on the Tailwind watcher to recreate styles.css, but the Tailwind CLI exits as soon as stdin reaches EOF — which is what it gets when the process runs detached. The dev server served the page with no stylesheet at all. - run a one-shot CSS build before starting the watcher so styles.css always exists, independent of whether the watcher survives - give the watcher an open stdin pipe rather than an inherited or ignored one - log when the watcher exits instead of failing silently The one-shot `npm run build` path used by CI and Vercel was unaffected. Also pins framework, build command, output directory and install command in vercel.json so the deployment does not depend on dashboard auto-detection.
The placeholder canonical, og:url, og:image, twitter:image, JSON-LD url, robots.txt sitemap line and sitemap.xml loc all pointed at patchdeck.vercel.app. That hostname is not ours: it serves an unrelated project called "PatchDeck — Visual Network Designer". Vercel assigned this project patchdeck-eta.vercel.app precisely because the plain name was taken. Left as-is it would have handed our canonical signal and link previews to a third party's site. Updates all eight references and records why the plain hostname must not be used.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #187, which merged before these two fixes were pushed. Both are on the same branch.
1. Canonical URLs pointed at a domain we do not own — please prioritise this one
The placeholder
https://patchdeck.vercel.appshipped tomainin #187. That hostname is not ours: it serves an unrelated project titled "PatchDeck — Visual Network Designer". Vercel assigned this projectpatchdeck-eta.vercel.appprecisely because the plain name was already taken.Left in place, it hands our canonical signal, OG link previews and sitemap to a third party's site. Eight references were affected:
index.html—<link rel="canonical">,og:url,og:image,twitter:image, and the JSON-LDurlpublic/robots.txt— theSitemap:linepublic/sitemap.xml— the<loc>elementAll now point at
https://patchdeck-eta.vercel.app.site/README.mdrecords why the plain hostname must not be substituted back.Production is currently serving the incorrect canonical, so this is worth merging promptly.
2. Dev server served the page with no stylesheet
build.mjs --watchcleareddist/and then relied on the Tailwind watcher to recreatestyles.css, but the Tailwind CLI exits the moment stdin reaches EOF — which is what it gets when the process runs detached. Result:styles.css404'd and the page rendered unstyled.styles.cssalways exists regardless of whether the watcher survivesThe one-shot
npm run buildpath used by CI and Vercel was never affected.Also pins
framework,buildCommand,outputDirectoryandinstallCommandinvercel.json, so deployments do not depend on dashboard auto-detection.Verification
Vercel project
patchdeckis created and linked (root directorysite). Verified against the live branch preview atpatchdeck-git-jeremymcs-website-fluxlabs-projects.vercel.app:styles.css, all six screenshots,favicon.svg,robots.txt,sitemap.xmlandog.pngall return 200 with correct content typescache-control: public, max-age=31536000, immutableconfirmed on/assets/*x-content-type-options,x-frame-options,referrer-policyandpermissions-policyconfirmed on all routes🤖 Generated with Claude Code
https://claude.ai/code/session_01LF9K9Y3sGMA2EAQVqF93JW